package com.booza.model;

import java.util.Date;

/**
 * A domain model to store and retrieve information from the financials table. This stores all of the credits and debits
 * for credit card transactions and credits and debits for wager games.
 */
public class Financials
{
	// Persistent fields
	private Integer transactionId;
	private Integer accountId;
	private Integer id; // either game ID, tournament ID, league ID or Wirecard Payin ID
	private Integer amount;
	private Integer creditordebit; // 1 if credit, 0 if debit
	private Integer status;
	private Date transactionDate;
	private String transactionType; 
	private Integer totalCredits;

	/**
	 * Default constructor.
	 */
	public Financials() {

	}

	/**
	 * @param transactionId
	 * @param accountId
	 * @param id
	 * @param amount
	 * @param creditordebit
	 * @param status
	 * @param transactionDate
	 * @param transactionType
	 * @param totalCredits
	 */
	public Financials(Integer transactionId, Integer accountId, Integer id, Integer amount, Integer creditordebit,
			Integer status, Date transactionDate, String transactionType, int totalCredits)
	{
		super();
		this.transactionId = transactionId;
		this.accountId = accountId;
		this.id = id;
		this.amount = amount;
		this.creditordebit = creditordebit;
		this.status = status;
		this.transactionDate = transactionDate;
		this.transactionType = transactionType;
		this.totalCredits = totalCredits;
	}

	public Integer getAccountId()
	{
		return accountId;
	}

	public void setAccountId(Integer accountId)
	{
		this.accountId = accountId;
	}
	
	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public Integer getAmount()
	{
		return amount;
	}

	public void setAmount(Integer amount)
	{
		this.amount = amount;
	}

	public Integer getCreditordebit()
	{
		return creditordebit;
	}

	public void setCreditordebit(int creditordebit)
	{
		this.creditordebit = creditordebit;
	}

	public Integer getStatus()
	{
		return status;
	}

	public void setStatus(Integer status)
	{
		this.status = status;
	}

	public Date getTransactionDate()
	{
		return transactionDate;
	}

	public void setTransactionDate(Date transactionDate)
	{
		this.transactionDate = transactionDate;
	}

	public Integer getTransactionId()
	{
		return transactionId;
	}

	public void setTransactionId(Integer transactionId)
	{
		this.transactionId = transactionId;
	}

	public String getTransactionType()
	{
		return transactionType;
	}

	public void setTransactionType(String transactionType)
	{
		this.transactionType = transactionType;
	}

	public Integer getTotalCredits()
	{
		return totalCredits;
	}

	public void setTotalCredits(Integer totalCredits)
	{
		this.totalCredits = totalCredits;
	}

	public void setCreditordebit(Integer creditordebit)
	{
		this.creditordebit = creditordebit;
	}

	@Override
	public String toString() 
	{
		return "Financials [transactionId=" + transactionId + ", accountId=" + accountId + ", id=" + id + ", amount="
				+ amount + ", creditordebit=" + creditordebit + ", status=" + status + ", transactionDate=" + transactionDate
				+ ", transactionType=" + transactionType + ", totalCredits=" + totalCredits + "]";
	}
}
